﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InterfacePractice
{
    class Program
    {
        static void Main(string[] args)
        {
            List<IExecutable> executionList = new List<IExecutable>()
            {
                new Mythics(),
                new Cat(),
                new Song(),
                new EveningTale()
            };

            Worker robot = new Worker(executionList);
            robot.Run();
        }
    }

    class Worker 
    {
        List<IExecutable> executions;

        public void Run()
        {
            foreach (IExecutable ex in executions)
            {
                ex.Execute();
            }
        }

        public Worker(List<IExecutable> executions)
        {
            this.executions = executions;
        }
    }

    interface IExecutable
    {
        void Execute();
    }

    class Mythics : IExecutable
    {
        public void Execute()
        {
            Console.WriteLine("Я зафармил Юле мифики на 15 сундук :3");
        }

    }

    class Cat : IExecutable
    {
        public void Execute()
        {
            Console.WriteLine("Я покормил, вычесал и выгулял кота");
        }
    }

    class Song : IExecutable
    {
        public void Execute()
        {
            Console.WriteLine("Включаю Nickelback...");
        }
    }

    class EveningTale : IExecutable
    {
        public void Execute()
        {
            Console.WriteLine("Читаю Юле на ночь Шилда.");
        }
    }
}
